package com.codingx.validator.model;
import lombok.Data;
import javax.validation.constraints.*;

@Data
public class User {
    @NotNull(message = "用户名不能为空")
    @Size(message = "用户名长度不满足",max = 8,min = 5)
    private String username;
    @Pattern(message = "性别不对",regexp = "^(男|女){1}$" )
    private String userSex;
    @Email(message = "邮箱错误")
    private String userEmail;
    @Min(message = "未满十八周岁",value = 18)
    private Integer userAge;
    private String passwd;
    @Pattern(regexp = "^[1][3,4,5,6,7,8,9][0-9]{9}$", message = "手机号格式有误")
    private String mobilePhone;
}
